<?php

define( "PROJECT_DIR", $_SERVER['DOCUMENT_ROOT'] );
define( "TEMPLATE_DIR", PROJECT_DIR."/templates" );
define( "INCLUDE_DIR", PROJECT_DIR."/includes" );

if( substr( PHP_OS, 0, 3 ) == "WIN" ) 
	ini_set( "include_path", ini_get("include_path") . ";" . PROJECT_DIR . "/PEAR/" );
else ini_set( "include_path", ini_get("include_path") . ":" . PROJECT_DIR . "/PEAR/" );

require_once "pear.inc.php";

function br2nl( $str ) {
	return str_replace( "<br />", "", $str );
	return $str;
}

function nextAuto( $table ) {
	$query = mysql_query( "SHOW TABLE STATUS LIKE '$table'" );
	$result = mysql_fetch_assoc( $query );
	return $result[ 'Auto_increment' ];
}

?>